package com.zixuan.gulicollege.service_order.client;

import com.zixuan.gulicollege.entity.eduservice.vo.CourseInitFrontVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @ClassName EduCourseClient
 * @Author by zixuan
 * @Date 2021/5/27 16:58
 */
@FeignClient(value = "service-edu")
@Component
public interface EduCourseClient {

    /**
     * 远程调用 根据课程id查询课程信息
     * @param courseId
     * @return
     */
    @GetMapping("/edu_service/course_front/getCourseInfo/{courseId}")
    CourseInitFrontVO getCourseInfo(@PathVariable String courseId);

    /**
     * 修改课程购买数量
     * @param courseId
     * @return
     */
    @PostMapping("/edu_service/course_front/updateCourseBuyCount")
    boolean updateCourseBuyCount(String courseId);
}
